package com.jdbc.pet;

public class Pet {
    private int id;
    private int ownerId;
    private String nickname;
    private String type;
    private int age;
    private String gender;
    private int price;

    // 构造函数
    public Pet() {}

    // 带参数的构造函数
    public Pet(int id, int ownerId, String nickname, String type, int age, String gender, int price) {
        this.id = id;
        this.ownerId = ownerId;
        this.nickname = nickname;
        this.type = type;
        this.age = age;
        this.gender = gender;
        this.price = price;
    }

    // Getter和Setter方法
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getOwnerId() {
        return ownerId;
    }

    public void setOwnerId(int ownerId) {
        this.ownerId = ownerId;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    @Override
    public String toString() {
        return "Pet{" +
                "id=" + id +
                ", ownerId=" + ownerId +
                ", nickname='" + nickname + '\'' +
                ", type='" + type + '\'' +
                ", age=" + age +
                ", gender='" + gender + '\'' +
                ", price=" + price +
                '}';
    }
}
